-- GENERATED SPELL FOR [Dunemaul Ogre Mage] --


function spell0_5473(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5473', 30314, 1)
end

function spell1_5473(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5473', 3000, 1)
end

function spell2_5473(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5473', 10000, 1)
end

function Sorts_5473(pUnit, Event)
local choix_sorts_5473 = math.random(0, 2)
if choix_sorts_5473 == 0 then
pUnit:RegisterEvent('spell0_5473', 1, 1)
end
if choix_sorts_5473 == 1 then
pUnit:RegisterEvent('spell1_5473', 1, 1)
end
if choix_sorts_5473 == 2 then
pUnit:RegisterEvent('spell2_5473', 1, 1)
end
end

function mob5473_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5473', math.random(1500, 3000), 1)
end

function mob5473_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5473_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5473_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5473, 1, 'mob5473_Action')
RegisterUnitEvent(5473, 2, 'mob5473_Leave')
RegisterUnitEvent(5473, 3, 'mob5473_Kill')
RegisterUnitEvent(5473, 4, 'mob5473_Die')
